package crp.infra.storage;

import com.qwlabs.cdi.Dispatchable;
import com.qwlabs.storage.minio.CustomMinioClient;
import com.qwlabs.storage.minio.MinioStorageEngine;
import crp.core.shared.Configs;
import org.checkerframework.checker.nullness.qual.Nullable;

import java.util.Objects;


public class DefaultStorageEngine extends MinioStorageEngine implements Dispatchable<String> {
    public DefaultStorageEngine(CustomMinioClient minioClient) {
        super(minioClient);
    }

    @Override
    public boolean dispatchable(@Nullable String context) {
        return Objects.equals(context, Configs.DEFAULT_ENV);
    }
}
